<html>
    <head>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script>
            function detect() {           
                $.ajax({ 
                    type: "GET",
                    url: "http://localhost:8080/webapp-snippets/springmvc-ajax-detect.do",
                    success: function(data){                       
                        $("#result").html(data);
                    }
                });
            }
        </script>
    </head>
    <body>
        <button id="ajaxButton" onclick="detect()" title="Button">send and detect</button><br>
        is it an ajax call: <span id="result"></span>
    </body>
</html>
